//
// draw_.h - This file implement an abstract class to draw_

#ifndef _VIRTUAL_DRAW_
#define _VIRTUAL_DRAW_

#define  draw_RED           0xFF0000L   /* 255,  0,  0 */
#define  draw_DARK_RED      0x800000L   /* 128,  0,  0 */
#define  draw_GREEN         0x00FF00L   /*   0,255,  0 */
#define  draw_DARK_GREEN    0x008000L   /*   0,128,  0 */
#define  draw_BLUE          0x0000FFL   /*   0,  0,255 */
#define  draw_DARK_BLUE     0x000080L   /*   0,  0,128 */

#define  draw_YELLOW        0xFFFF00L   /* 255,255,  0 */
#define  draw_DARK_YELLOW   0x808000L   /* 128,128,  0 */
#define  draw_MAGENTA       0xFF00FFL   /* 255,  0,255 */
#define  draw_DARK_MAGENTA  0x800080L   /* 128,  0,128 */
#define  draw_CYAN          0x00FFFFL   /*   0,255,255 */
#define  draw_DARK_CYAN     0x008080L   /*   0,128,128 */

#define  draw_WHITE         0xFFFFFFL   /* 255,255,255 */
#define  draw_BLACK         0x000000L   /*   0,  0,  0 */

#define  draw_DARK_GRAY     0x808080L   /* 128,128,128 */
#define  draw_GRAY          0xC0C0C0L   /* 192,192,192 */



//
//////////////////////////////////////////////////////////////////////////
class drawGRA
{
public:

  drawGRA(void) {}
  drawGRA(void *) {}
  ~drawGRA(void) {}

  virtual void setCanvas (void *) = 0;

  virtual void begin() = 0;
  virtual void addVertex (double x, double y, double z) = 0;
  virtual void end() = 0;

  virtual void PolyLine (int n, double *p) = 0;
  virtual void PolyMark (int n, double *p) = 0;
  virtual void FillArea (int n, double *p) = 0;
  virtual void text     (double x, double y, double z, char *s) = 0;

  virtual void SetFillIntStyle (int style) = 0;
  virtual void SetHatchStyle   (int style) = 0;
  virtual void SetLineStyle    (int s) = 0;
  virtual void SetLineWidth    (double w) = 0;
  virtual void SetMarkType     (int t) = 0;
  virtual void SetMarkSize     (double size) = 0;

  virtual void SetLineColor (long int c) = 0;
  virtual void SetMarkColor (long int c) = 0;
  virtual void SetFillColor (long int c) = 0;
  virtual void SetTextColor (long int c) = 0;


  virtual void setXor (int _xor) = 0;

  double ref_size;

  enum {                          /* background opacity mode */
    draw_OPAQUE,
    draw_TRANSPARENT
  };

  enum {                          /* interior style */
    draw_SOLID,
    draw_HATCH,
    draw_STIPPLE,
    draw_PATTERN,
    draw_HOLLOW
  };

  enum {                          /* hatch type */
    draw_HORIZONTAL,
    draw_VERTICAL,
    draw_FDIAGONAL,
    draw_BDIAGONAL,
    draw_CROSS,
    draw_DIAGCROSS
  };

  enum {                          /* line style */
    draw_CONTINUOUS,
    draw_DASHED,
    draw_DOTTED,
    draw_DASH_DOT,
    draw_DASH_DOT_DOT
  };

  enum {                          /* marker type */
    draw_PLUS,
    draw_STAR,
    draw_CIRCLE,
    draw_X,
    draw_BOX,
    draw_DIAMOND,
    draw_HOLLOW_CIRCLE,
    draw_HOLLOW_BOX,
    draw_HOLLOW_DIAMOND,
    draw_POINT
  };
};

#endif
